<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<!-- Copyright 1997 The Open Group, All Rights Reserved -->
<title>&lt;sched.h&gt;</title>
</head><body bgcolor=white>
<center>
<font size=2>
The Single UNIX &reg; Specification, Version 2<br>
Copyright &copy; 1997 The Open Group

</font></center><hr size=2 noshade>
<h4><a name = "tag_000_008_165">&nbsp;</a>NAME</h4><blockquote>
sched.h - execution scheduling
(<b>REALTIME</b>)
</blockquote><h4><a name = "tag_000_008_166">&nbsp;</a>SYNOPSIS</h4><blockquote>
<pre><code>

#include &lt;sched.h&gt;
</code>
</pre>
</blockquote><h4><a name = "tag_000_008_167">&nbsp;</a>DESCRIPTION</h4><blockquote>
The
<i>&lt;sched.h&gt;</i>
header defines the
<b>sched_param</b>
structure, which contains the scheduling parameters required for
implementation of each supported scheduling policy. This structure
contains at least the following member:
<pre>
<code>
int    sched_priority    process execution scheduling priority
</code>
</pre>
<p>
Each process is controlled by an associated scheduling policy and
priority.  Associated with each policy is a priority range.  Each
policy definition specifies the minimum priority range for that
policy.  The priority ranges for each policy may overlap
the priority ranges of other policies.
<p>
Three scheduling policies are defined; others may be defined by the
implementation.  The three standard policies are indicated by the
values of the following symbolic constants:
<dl compact>

<dt>SCHED_FIFO<dd>
First in-first out (FIFO) scheduling policy.

<dt>SCHED_RR<dd>
Round robin scheduling policy.

<dt>SCHED_OTHER<dd>
Another scheduling policy.

</dl>
<p>
The values of these constants are distinct.
<p>
The following are declared as functions and may also be declared as
macros.
Function prototypes must be provided for use with an ISO C
compiler.
<pre>
<code>
int    <a href="sched_get_priority_max.html">sched_get_priority_max</a>(int);
int    <a href="sched_get_priority_min.html">sched_get_priority_min</a>(int);
int    <a href="sched_getparam.html">sched_getparam</a>(pid_t, struct sched_param *);
int    <a href="sched_getscheduler.html">sched_getscheduler</a>(pid_t);
int    <a href="sched_rr_get_interval.html">sched_rr_get_interval</a>(pid_t, struct timespec *);
int    <a href="sched_setparam.html">sched_setparam</a>(pid_t, const struct sched_param *);
int    <a href="sched_setscheduler.html">sched_setscheduler</a>(pid_t, int, const struct sched_param *);
int    <a href="sched_yield.html">sched_yield</a>(void);
</code>
</pre>
<p>
Inclusion of the
<i>&lt;sched.h&gt;</i>
header will make visible symbols defined in the header
<i><a href="time.h.html">&lt;time.h&gt;</a></i>.
</blockquote><h4><a name = "tag_000_008_168">&nbsp;</a>APPLICATION USAGE</h4><blockquote>
None.
</blockquote><h4><a name = "tag_000_008_169">&nbsp;</a>FUTURE DIRECTIONS</h4><blockquote>
None.
</blockquote><h4><a name = "tag_000_008_170">&nbsp;</a>SEE ALSO</h4><blockquote>
<i><a href="time.h.html">&lt;time.h&gt;</a></i>.
</blockquote><hr size=2 noshade>
<center><font size=2>
UNIX &reg; is a registered Trademark of The Open Group.<br>
Copyright &copy; 1997 The Open Group
<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]

</font></center><hr size=2 noshade>
</body></html>
